#include "ARPListener.h"

ARPListener::~ARPListener()
{
	delete this -> respond;
	delete this -> filter;
}
void ARPListener::packetHandler(const u_char* packet, bpf_u_int32 len)
{
	cout << "got packet" << endl;
	ether_arp* arp;
	arp = (ether_arp*)(packet+sizeof(ether_header));
			this -> respond -> writeResponse(arp->arp_tpa,
								arp->arp_spa,
								arp->arp_sha);
}
